﻿using System;

namespace School
{
    public class Student
    {
        private string name;
        private int facultyNumber;

        public string Name
        {
            get
            {
                return name;
            }
            set 
            {
                if (value == null || value == "")
                {
                    throw new ArgumentNullException();
                }
                name = value; 
            }
        }

        public int FacultyNumber
        {
            get
            {
                return facultyNumber;
            }
            set
            {
                if (value < 10000 || value > 99999)
                {
                    throw new ArgumentOutOfRangeException();
                }
                facultyNumber = value;
            }
        }

        public Student(string name, int facultyNumber)
        {
            this.Name = name;
            this.FacultyNumber = facultyNumber;
        }
    }
}